﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewAll.ascx.cs" Inherits="Team4Mock.UserControl.TrustRegion.ViewAll" %>
<style type="text/css">
    .style3
    {
        width: 233px;
    }
    .style4
    {
        width: 97px;
    }
    .style5
    {
        width: 173px;
    }
    h3
    {
        font-size: 17px;
        margin: 0px;
    }
</style>
<style type="text/css">
    .style1
    {
        width: 168px;
    }
    .style2
    {
        width: 168px;
        height: 35px;
    }
    .style3
    {
        height: 35px;
        width: 573px;
    }
    .style4
    {
        width: 168px;
        height: 30px;
    }
    .style5
    {
        height: 30px;
        width: 573px;
    }
    .style6
    {
        width: 573px;
    }
</style>
<script type="text/javascript">
    function Rediect() {
        alert("You do not have permission to on this page");
        window.location.href = "/FormView/Default.aspx";
    }
    function Error() {
        alert("Error in processing !");
        window.location.href = "/FormView/Default.aspx";
    }
</script>
<script type="text/javascript">
    $(document).ready(function () {

        $(".tab_content").hide();
        $("ul.tabs li:first").addClass("active").show();
        $(".tab_content:first").show();

        $("ul.tabs li").click(function () {

            $("ul.tabs li").removeClass("active");
            $(this).addClass("active");
            $(".tab_content").hide();

            var activeTab = $(this).find("a").attr("href");
            $(activeTab).slideDown();
            return false;
        });
    });
</script>

<asp:Panel ID="pnView" runat="server">
    <div id="Directorate" class="tab_content">
        <fieldset style="margin-left: 0px; width: 740px;">
            <legend style="height: 25px; background-color: #465c71; -webkit-border-radius: 5px 5px 0px 0px;
                color: #dde4ec; font-size: 18px;">Trust Region List</legend>
            <div style="width: 486px; float: left; height: 32px; font-size: 14px; line-height: 32px;">
                <asp:LinkButton ID="All" runat="server" Text="All" OnClick="All_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton2" runat="server" Text="A-B-C-D-E" OnClick="LinkButton2_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton3" runat="server" Text="F-G-H-I-J" OnClick="LinkButton3_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton4" runat="server" Text="K-M-N-L" OnClick="LinkButton4_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton5" runat="server" Text="O-P-Q-R" OnClick="LinkButton5_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton6" runat="server" Text="S-T-U-V" OnClick="LinkButton6_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton7" runat="server" Text="W-X-Y-Z" OnClick="LinkButton7_Click"></asp:LinkButton>
            </div>
            <div style="float: left; height: 32px; line-height: 32px;">
                &nbsp;
                <asp:Button ID="btnCreate" runat="server" Text="Create" CssClass="button" OnClick="btnCreate_Click" />&nbsp;
                <asp:CheckBox ID="CheckBox1" runat="server" Text="In-active" Style="font-size: 15px;"/>
            </div>
            <div style="width: 784px;float:left;font-size: 15px;">
            <asp:UpdatePanel ID="pnanel" runat="server">
                    <ContentTemplate>
            <asp:Label runat="server" ID="lb"></asp:Label>
                <asp:GridView ID="gvTrustRegion" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                    Width="725px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true"
                    BorderStyle="None" BorderWidth="1px" CellPadding="3">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Trust Region Name">
                            <ItemTemplate>
                                <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/TrustRegion.aspx?"+"ID="+Eval("ID") %>'
                                    Text='<%#Eval("Name") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Nation/Country">
                            <ItemTemplate>
                                <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Nation") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Is Active">
                            <ItemTemplate>
                                <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="All" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton3" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton4" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton5" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton6" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton7" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="pnanel">
                </asp:UpdateProgress>
            </div>
        </fieldset>
    </div>
</asp:Panel>
<asp:Panel ID="pnct" runat="server" Width="755px" Style="margin-left: 10px;">
    <h3>
        TrustRegion Details</h3>
    <div style="width: 754px;">
        <ul class="tabs" style="width: 760px; float: left;">
            <li><a href="#Details1" class="tab">Details</a></li>
            <li><a href="#Trust" class="tab">Trust District</a></li>
        </ul>
        <br />
        <div class="tab_container">
            <div id="Details1" class="tab_content" style="font-size: 15px;">
            
                <table width="700px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td class="style2">
                            Nation/Country <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style3">
                            <asp:DropDownList ID="dlNation"  DataTextField="CountryName" DataValueField="CountryName" runat="server" Width="186px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Trust Region Name<span style="color: Red;">(*)</span>
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="txtRegionName" runat="server" Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Description
                        </td>
                        <td class="style6">
                            <asp:TextBox ID="txtDes" runat="server" Height="63px" Style="margin-left: 0px" TextMode="MultiLine"
                                Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                    <td>
                    &nbsp;
                    </td>
                    <td>
                        <asp:CheckBox runat="server" ID="ckisactive" Text="Is Active"/>
                    </td>
                    </tr>
                </table>
                <br />
                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button" 
                    onclick="btnSave_Click" />
                <asp:Button ID="btnBack" runat="server" Text="Back" CssClass="button" OnClick="btnBack_Click" /><br/>
                <asp:Label runat="server" ID="tb"></asp:Label>
            </div>
        </div>
        <div class="tab_container">
            <div id="Trust" class="tab_content">
            <div style="width: 486px; float: left; height: 32px; font-size: 14px; line-height: 32px;">
                <asp:LinkButton ID="LinkButton1" runat="server" Text="All"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton8" runat="server" Text="A-B-C-D-E" ></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton9" runat="server" Text="F-G-H-I-J" ></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton10" runat="server" Text="K-M-N-L" ></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton11" runat="server" Text="O-P-Q-R" ></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton12" runat="server" Text="S-T-U-V" ></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton13" runat="server" Text="W-X-Y-Z" ></asp:LinkButton>
            </div>
            <div style="float: left; height: 32px; line-height: 32px;">
                &nbsp;
                <asp:Button ID="Button1" runat="server" Text="Create" CssClass="button" 
                    onclick="Button1_Click"/>&nbsp;
                <asp:CheckBox ID="CheckBox2" runat="server" Text="In-active" Style="font-size: 15px;"
                    AutoPostBack="false" />
            </div>
                <asp:GridView ID="gvTrustDistrict" AutoGenerateColumns="False" DataKeyNames="ID"
                    runat="server" Width="725px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC"
                    AllowSorting="true" BorderStyle="None" BorderWidth="1px" CellPadding="3">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Trust District Name">
                            <ItemTemplate>
                                <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/TrustDistrict.aspx?"+"ID="+Eval("ID")+"&t="+Request.QueryString["ID"] %>'
                                    Text='<%#Eval("Name") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Nation/Country">
                            <ItemTemplate>
                                <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Region") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Is Active">
                            <ItemTemplate>
                                <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
            </div>
        </div>
    </div>
</asp:Panel>
<asp:Panel runat="server" ID="Add">
    <h3>
    TrustRegion Details</h3>
<div style="width: 754px;">
    <ul class="tabs" style="width: 760px; float: left;">
        <li><a href="#Details1" class="tab">Details</a></li>
    </ul>
    <br />
    <div class="tab_container">
        <div id="Div1" class="tab_content">
            <table width="700px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td class="style2">
                            Nation/Country <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style3">
                            <asp:DropDownList ID="DropDownList1"  DataTextField="CountryName" DataValueField="CountryName" runat="server" Width="186px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Trust Region Name<span style="color: Red;">(*)</span>
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="TextBox1" runat="server" Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Description
                        </td>
                        <td class="style6">
                            <asp:TextBox ID="TextBox2" runat="server" Height="63px" Style="margin-left: 0px" TextMode="MultiLine"
                                Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                    <td>
                    &nbsp;
                    </td>
                    <td>
                        <asp:CheckBox runat="server" ID="CheckBox3" Text="Is Active"/>
                    </td>
                    </tr>
                </table>
            <br />
            <asp:Button ID="Button2" runat="server" Text="Save" CssClass="button" 
                onclick="Button2_Click" />
            <asp:Button ID="Button3" runat="server" Text="Back" CssClass="button" OnClick="btnBack_Click" />
            <asp:Label runat="server" ID="Label1"></asp:Label>
        </div>
    </div>
</div>

</asp:Panel>
